<template>
	<view class="container">
		<view class="user-section">
			<view class="money_qian">
				<text>{{user.balance}}</text>
				<text>钱包总额</text>
			</view>
			<!-- <view class="money_conet">
				<view class="money_item" @click="navTo('/pages/money/addmoney')">
					充值
				</view>
				<view class="money_item" @click="cash()" style="background: #da5953;">
					提现
				</view>
			</view> -->
		</view>
		<view class="">
			<view @click="navTo('/pages/money/moneybill')" style="display: flex; justify-content: space-between; background-color: #fff; margin: 10px;padding-bottom: 10px; font-size: 17px; background: #fff; border-bottom: #D6D6D6 1px solid;">
				<text style="color: #303133;">账目明细</text>
				<uni-icons type="icon-fanhui2" color="#606266"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	import uniIcons from '../../ed-icons/ed-icons.vue'
	import {
		getOne
	} from '../../api/publicapi.js'

	export default {
		components: {
			uniIcons
		},
		data() {
			return {
				user: []
			}
		},
		onShow() {
			this.getmoney()
		},
		methods: {
			navTo(url) {
				uni.navigateTo({
					url
				})
			},
			getmoney() {
				getOne('front/user/getuser').then(res => {
					this.user = res
				})
			},
			cash() {
				uni.showModal({
					content: '该功能正在内测中！',
					showCancel: false
				});
			}
		}
	}
</script>
<style lang="scss">
	.user-section {
		height: 400rpx;
        
		position: relative;
		background-color: #d23931;

		// .bg{
		// 	position:absolute;
		// 	left: 0;
		// 	top: 0;
		// 	width: 100%;
		// 	height: 100%;
		// 	filter: blur(1px);
		// 	opacity: .7;
		// }
		.money_conet {
			display: flex;
			justify-content: space-between;

			position: absolute;
			bottom: 0rpx;
			width: 100%;

			.money_item {
				flex: 0 0 50%;
				padding: 20upx;
				background-color: rgba(255, 255, 255, 0.4);
				text-align: center;
				color: #F5F5F5;
			}
		}

		.money_qian {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			align-items: center;
			padding-top: 100upx;
			font-size: 25px;
			color: #F5F5F5;
		}
	}
</style>
